$(function () {
    $(document).ready(function () {
        let url = localStorage.getItem('last_url') || '';
        $('#frame').attr('src', url);
    });

    $('.navigation,.dropdown-menu').find('li a[data-href]').click(function () {
        let that = $(this);
        let frame = $('#frame');
        let url = that.data('href');
        let curUrl = frame.attr('src');
        if (curUrl !== url) {
            localStorage.setItem('last_url', url);
            frame.attr('src', url);
        }
    });
});
